﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using QLNHASACH.DTO;
using QLNHASACH.DataAccessLayer.ObjectDAO;

namespace QLNHASACH.BussinessLayer
{
    class TheLoaiBUS
    {
        public static DataTable LayDSTheLoai()
        {
            return TheLoaiDAO.LayDSTheLoai();
        }
        public static bool ThemTheLoai(string tl)
        {
            if (TheLoaiDAO.KiemTraTonTaiTheoTen(tl) == false)
            {
                if (TheLoaiDAO.ThemTheLoai(tl) == true)
                    return true;
            }
            return false;
        }
        public static int LayMaTheLoaiTheoTen(string tenTL)
        {
            return TheLoaiDAO.LayMaTheLoaiTheoTen(tenTL);
        }
    }
}
